<template>
	<view v-if="info.image" class="postsPage">
		<u-navbar @leftClick="goCustomNavBack" title=" " bgColor="transparent" :autoBack="true" leftIconColor="#fff">
		</u-navbar>
		<image class="slideImage" :src="info.image?(baseUrl+'/sys/common/static/'+info.image):''" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseUrl: this.$api.baseUrl,
				info: {}
			}
		},
		onLoad(option) {
			if (option.id) {
				this.$request.get(this.$api.getPostsDetail, {
					bannerId: option.id
				}).then(res => {
					this.info = res.result
					uni.hideLoading()
				})
			} else {
				uni.showToast({
					icon: "error",
					title: "无法获取海报详情"
				})
				uni.navigateBack({

				})
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.postsPage {
		height: 100vh;

		.slideImage {
			width: 100vw
		}
	}
</style>
